{layout name="layout/index" /}
<div class="panel panel-default panel-intro">
  <div class="panel-body" id="contents">
      <div class="bootstrap-table">
      <div class="fixed-table-toolbar">
      {empty name="hidden"}
      <div class="commonsearch-table hidden">
        <div class="form-group" style="position: relative;">
         <input type="hidden" id="vod_id" name="vod_id" value="{$vid|default=''}"> 
         <input type="text" id="actor_reurl" name="actor_reurl" value="{$info.actor_reurl|default=''}" class="form-control" placeholder="慢慢看角色表,TV2345角色表,百度百科,好搜百科" data-tip="慢慢看角色表,TV2345角色表,百度百科,好搜百科"><a href="javascript:;" id="getrole" class="btn btn-success btn-add" style="cursor:pointer; position:absolute; right:0px; top:0px;">采集角色</a>
        </div> 
    </div>
        <div class="columns-right pull-right" style="margin-top:10px;">
                <a href="javascript:;" class="btn  btn-default hidedsearch" title="采集">采集</a>
         </div>
        {/empty} 
        <div class="bs-bars pull-left">
          <div id="toolbar" class="toolbar pull-left"><a href="javascript:;" data-name="添加角色" data-url="{:admin_url('admin/actor/addrole',array('vid'=>$vid))}" class="btn btn-success btn-add btn-editones"><i class="fa fa-plus"></i> 添加</a> <a  url="{:admin_url('admin/role/ajaxstatus',array('status'=>1))}" target-form="table" class="confirm btn btn-info btn-disabled ajax-post disabled"><i class="fa fa-unlock"></i> 显示</a> <a  url="{:admin_url('admin/role/ajaxstatus',array('status'=>0))}" target-form="table" class="confirm btn btn-warning btn-disabled ajax-post disabled"><i class="fa fa-lock"></i> 隐藏</a> <a  url="{:admin_url('admin/role/ajaxdel')}" target-form="table" class="confirm btn btn-danger btn-del btn-disabled ajax-post disabled"><i class="fa fa-trash"></i> 删除</a> <a  href="{:admin_url('admin/pic/actor',array('vid'=>$vid))}"  class="confirm btn bg-purple"><i class="fa fa-download"></i> 下载图片</a><span id="selectedChks" style="display:none; margin-left:10px;">已选择<strong></strong>记录</span> </div>
        </div>
      </div>         
    </div>
    <div class="fixed-table-body">
        <table id="table" class="table table-striped table-bordered table-hover" style="margin-top: 0px;" width="100%">
          <thead>
            <tr style="height:45px;">
              <th class="bs-checkbox "><input name="btSelectAll" type="checkbox"></th>
              <th style="text-align:center;vertical-align: middle;">角色编号</th>
              <th style="text-align:center;vertical-align: middle;">角色分类</th>
              <th style="text-align:center;vertical-align: middle;">角色名称</th>
              <th style="text-align:center;vertical-align: middle;">明星名字</th>
              <th style="text-align:center;vertical-align: middle;">角色排序</th>
              <th style="text-align:center;vertical-align: middle;">角色星级</th>
              <th style="text-align:center;vertical-align: middle;">角色人气</th>
              <th style="text-align:center;vertical-align: middle;">角色状态</th>
              <th style="text-align:center;vertical-align: middle;">相关操作</th>
            </tr>
          </thead>
          <tbody>
          {notempty name="list"}
          {volist name="list" id="vo"}
          <tr>
            <td class="bs-checkbox"><input data-index="{$vo['role_id']}" name="id[]" type="checkbox"  value="{$vo['role_id']}"></td>
            <td style="text-align:center;vertical-align: middle;">{$vo['role_id']}</td>
            <td style="text-align:center;vertical-align: middle;">{:getlistname($vo['role_cid'])}</td>
                <td style="text-align:center;vertical-align: middle;"><a href="javascript:;" class="btn-link editable editable-click" data-id="{$vo['role_id']}" data-name="role_name" data-type="text" data-pk="{$vo['role_id']}" data-url="{:admin_url('admin/role/editable')}">{$vo.role_name}</a></td>
                <td style="text-align:center;vertical-align: middle;"><a href="javascript:;" class="btn-link editable editable-click" data-id="{$vo['role_id']}" data-name="role_star" data-type="text" data-pk="{$vo['role_id']}" data-url="{:admin_url('admin/role/editable')}">{$vo.role_star}</a></td>
                 <td style="text-align:center;vertical-align: middle;"><a href="javascript:;" class="btn-link editable editable-click" data-id="{$vo['role_id']}" data-name="role_oid" data-type="text" data-pk="{$vo['role_id']}" data-url="{:admin_url('admin/role/editable')}">{$vo.role_oid}</a></td> 
            <td style="text-align:center;vertical-align: middle;">{volist name=":admin_star_arr($vo.role_stars)" id="ajaxstar"}<img src="{$config.site.cdnurl}admin/zanpiancms/img/star{$ajaxstar}.gif"  id="role_{$vo.role_id}_{$i}" class="setstars">{/volist}</td>
            <td style="text-align:center;vertical-align: middle;">{$vo.role_hits}</td>
            <td style="text-align:center;vertical-align: middle;"> {eq name="vo.role_status" value="1"} <a class="btn btn-info btn-xs btn-success ajax-get" url="{:admin_url('admin/role/ajaxstatus',array('id'=> $vo['role_id'],'status'=>0))}">显示</a>{else /}<a class="btn btn-info btn-xs btn-danger ajax-get" url="{:admin_url('admin/role/ajaxstatus',array('id'=> $vo['role_id'],'status'=>1))}">隐藏</a>{/eq} </td>
            <td style="text-align:center;vertical-align: middle;"><a href="javascript:;" data-url="{:admin_url('admin/actor/editrole',array('id'=> $vo['role_id']))}"  data-name="编辑角色" class="btn btn-success btn-edit btn-xs btn-editones"><i class="fa fa-pencil"></i> 编辑</a> <a url="{:admin_url('admin/role/ajaxdel' , array('id' => $vo['role_id']))}" class="confirm btn btn-danger btn-xs confirm ajax-get"><i class="fa fa-trash-o"></i> 删除</a></td>
          </tr>
          {/volist}   
          {else/}
          <tr>
            <td style="text-align:center;vertical-align: middle;" colspan="10" >抱歉，没有找到角色,先添加吧！</td>
          </tr>
          {/notempty}
          </tbody>
          
        </table>
    </div>
  </div>
</div>